def generate_test_cases():
    test_cases = [
        {"nums": [8,1,2], "k": 2, "output": 35},
        {"nums": [1,2,4,8], "k": 1, "output": 31},
        {"nums": [0,0,0], "k": 5, "output": 0},
        {"nums": [7,7,7], "k": 3, "output": 63},
        {"nums": [5,3,9,1], "k": 2, "output": 45}
    ]
    return test_cases

if __name__ == "__main__":
    for i, case in enumerate(generate_test_cases()):
        print(f"样例{i+1}: nums={case['nums']}, k={case['k']}, output={case['output']}") 